// 倒计时封装

function timers() {
    const TIME_COUNT = 100;
    if (!this.timer) {
        this.count = TIME_COUNT;
        this.timer = setInterval(() => {
            if (this.count > 0 && this.count <= TIME_COUNT) {
                this.count--;
            } else {
                clearInterval(this.timer);
                this.timer = null;
                this.count = "";
            }
        }, 300);
    }
}
module.exports = timers